package com.wwf.myblog.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * @author lulei
 * @date 2020年12月10日 14:26:35
 */

@Component
@ConfigurationProperties(prefix = "person")
public class Person {
    private Integer id;
    private String username;
    private String[] familys;
    private Pet pet;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Pet getPet() {
        return pet;
    }

    public void setPet(Pet pet) {
        this.pet = pet;
    }

    public String[] getFamilys() {
        return familys;
    }

    public void setFamilys(String[] familys) {
        this.familys = familys;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", familys=" + Arrays.toString(familys) +
                ", pet=" + pet +
                '}';
    }
}
